package com.landian.commons.jpa.utils;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @deprecated Use {@link com.landian.commons.jpa.builder.PageImplBuilder} instead.
 * @author caojl
 */
@Deprecated
public class PageImplBuilder {

    /**
     * @deprecated Use {@link com.landian.commons.jpa.builder.PageImplBuilder#newInstance(org.springframework.data.domain.Pageable, java.util.List, long)} instead.
     * @param page
     * @param content
     * @param total
     * @param <T>
     * @return
     */
    @Deprecated
    public static <T> Page newInstance(Pageable page, List<T> content, long total) {
        return com.landian.commons.jpa.builder.PageImplBuilder.newInstance(page, content, total);
    }
}
